package com.study.system.course.controller;

import com.edu.common.entity.CourseType;
import com.study.system.course.service.CourseTypeService;
import jakarta.annotation.Resource;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class CourseTypeController {

    @Resource
    private CourseTypeService courseTypeService;

    @RequestMapping("/course-types")
    public ResponseEntity<List<CourseType>> getAllCourseTypes(){
        List<CourseType> list = courseTypeService.list();
        return ResponseEntity.ok(list);
    }
}
